From: tsteven4 Date: Sat, 18 Jul 2015 13:41:58 +0000 (+0000) Subject: Fix decoding of mtk SID-ELE-AZI-SNR data when not all fields are present. X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~10^2~23 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=5181bf7cff20c26b1dbfaf3644c24bbf2812f139;p=gpsbabel.git Fix decoding of mtk SID-ELE-AZI-SNR data when not all fields are present. --- diff --git a/gpsbabel/mtk_logger.cc b/gpsbabel/mtk_logger.cc index c5941b942..1b5941f1f 100644 --- a/gpsbabel/mtk_logger.cc +++ b/gpsbabel/mtk_logger.cc @@ -1170,6 +1170,7 @@ int mtk_parse(unsigned char* data, int dataLen, unsigned int bmask) break; case 1< 32) { @@ -1178,12 +1179,17 @@ int mtk_parse(unsigned char* data, int dataLen, unsigned int bmask) itm.sat_count = sat_count; sid_size = log_type[SID].size; + azoffset = 0; + snroffset = 0; if (sat_count > 0) { // handle 'Zero satellites in view issue' if (bmask & (1<